import 'package:css_colors/css_colors.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: UsingPackagesPage(title: 'Using Pakages'),
    );
  }
}

class UsingPackagesPage extends StatefulWidget {
  UsingPackagesPage({Key key, this.title}) : super(key: key);
  final String title;
  @override
  _UsingPackagesState createState() => _UsingPackagesState();
}

class _UsingPackagesState extends State<UsingPackagesPage> {
  launchURL(){
    launch('https://icloudart.com');
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: new AppBar(
        title: Text('Using Packages'),
      ),
      body: Center(
        child:RaisedButton(
          onPressed: launchURL,
          child: Text('Charles Blog'),
          color: CSSColors.orange,
        )
      ),
    );
  }
}

